
const app = {
  state: {
    asildeColor: 'bg-dark lt',
    headerFixed: '',
    asideTop: '',
    currentmenu:'数据概览',
    contentHeight:600,
    map:null,
    lengedData:null,
    lengedTitle:''
  },
  mutations: {
    SET_ASLIDECOLOR: (state, payload) => {
      state.asildeColor = payload.asildeColor;
    },
    SET_HEADERFIXED: (state, payload) => {
      state.headerFixed = payload.headerFixed;
    },
    SET_ASIDETOP: (state, payload) => {
      state.asideTop = payload.asideTop;
    },
    SET_CURRENTMENU: (state, payload) => {
      state.currentmenu = payload.currentmenu;
    },
    SET_CONTENTHEIGHT: (state, payload) => {
      state.contentHeight = payload.contentHeight;
    },
    SET_MAP: (state, payload) => {
      state.map = payload.map;
    },
    SET_LENGEDTITLE: (state, payload) => {
      state.lengedTitle = payload.lengedTitle;
    },
    SET_LENGEDDATA: (state, payload) => {
      state.lengedData = payload.lengedData;
    },
  },
  actions: {
    changeAslideColor: ({ commit }, payload) => {
      commit('SET_ASLIDECOLOR', {
        asildeColor: payload.asildeColor
      });
    },
    changeHeaderFixed: ({ commit }, payload) => {
      commit('SET_HEADERFIXED', {
        headerFixed: payload.headerFixed
      });
    },
    changeAsideTop: ({ commit }, payload) => {
      commit('SET_ASIDETOP', {
        asideTop: payload.asideTop
      });
    },
    changeCurrentmenu:({ commit }, payload) => {
      commit('SET_CURRENTMENU', {
        currentmenu: payload.currentmenu
      });
    },
    changeContentHeight:({ commit }, payload) => {
      commit('SET_CONTENTHEIGHT', {
        contentHeight: payload.contentHeight
      });
    },
    changeMap:({ commit }, payload) => {
      commit('SET_MAP', {
        map: payload.map
      });
    },
    changeLengedTitle:({ commit }, payload) => {
      commit('SET_LENGEDTITLE', {
        lengedTitle: payload.lengedTitle
      });
    },
    changeLengedData:({ commit }, payload) => {
      commit('SET_LENGEDDATA', {
        lengedData: payload.lengedData
      });
    },
  }
};

export default app;
